const mysql  = require('mysql')
const dbconfig = {
    host:'localhost',
    port:3306,
    user:'root',
    password:'123456789',
    database:'farmingdata'
}
const connect = mysql.createConnection(dbconfig)
connect.connect(err=>{
    if(err){
        console.error('mysql链接错误',err)
    }else{
        console.log("链接成功")
    }
})
module.exports = connect;